﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using _MetalSlug.MyCharacters.Characters;
using _MetalSlug.MyCharacters.Characters.Guns;

namespace _MetalSlug.MyCharacters.BuilderFactories
{
    public abstract class MyBuilderFactory
    {
        List<Texture2D> dieTexture2Ds;
        public List<Texture2D> DieTexture2Ds
        {
            get { return dieTexture2Ds; }
            set { dieTexture2Ds = value; }
        }

        private List<Texture2D> runBodyShotGun;
        public List<Texture2D> RunBodyShotGun
        {
            get { return runBodyShotGun; }
            set { runBodyShotGun = value; }
        }

        private List<Texture2D> runBodyMiniGun;
        public List<Texture2D> RunBodyMiniGun
        {
            get { return runBodyMiniGun; }
            set { runBodyMiniGun = value; }
        }

        private List<Texture2D> upBodyMiniGun;
        public List<Texture2D> UpBodyMiniGun
        {
            get { return upBodyMiniGun; }
            set { upBodyMiniGun = value; }
        }

        private List<Texture2D> upBodyShotGun;
        public List<Texture2D> UpBodyShotGun
        {
            get { return upBodyShotGun; }
            set { upBodyShotGun = value; }
        }

        private List<Texture2D> shotBodyMiniGun;
        public List<Texture2D> ShotBodyMiniGun
        {
            get { return shotBodyMiniGun; }
            set { shotBodyMiniGun = value; }
        }

        private List<Texture2D> shotBodyShotGun;
        public List<Texture2D> ShotBodyShotGun
        {
            get { return shotBodyShotGun; }
            set { shotBodyShotGun = value; }
        }

        private List<Texture2D> runFoot;
        public List<Texture2D> RunFoot
        {
            get { return runFoot; }
            set { runFoot = value; }
        }

        private List<Texture2D> bodyShotGun;
        public List<Texture2D> BodyShotGun
        {
            get { return bodyShotGun; }
            set { bodyShotGun = value; }
        }

        private List<Texture2D> bodyMiniGun;
        public List<Texture2D> BodyMiniGun
        {
            get { return bodyMiniGun; }
            set { bodyMiniGun = value; }
        }

        private List<Texture2D> standFoot;

        public List<Texture2D> StandFoot
        {
            get { return standFoot; }
            set { standFoot = value; }
        }
        

        private List<Texture2D> crouchBodyMiniGun;
        public List<Texture2D> CrouchBodyMiniGun
        {
            get { return crouchBodyMiniGun; }
            set { crouchBodyMiniGun = value; }
        }

        private List<Texture2D> crouchBodyShotGun;
        public List<Texture2D> CrouchBodyShotGun
        {
            get { return crouchBodyShotGun; }
            set { crouchBodyShotGun = value; }
        }

        private List<Texture2D> crouchFoot;
        public List<Texture2D> CrouchFoot
        {
            get { return crouchFoot; }
            set { crouchFoot = value; }
        }

        private List<Texture2D> upShotMiniGun;
        public List<Texture2D> UpShotMiniGun
        {
            get { return upShotMiniGun; }
            set { upShotMiniGun = value; }
        }

        private List<Texture2D> upShotShotGun;
        public List<Texture2D> UpShotShotGun
        {
            get { return upShotShotGun; }
            set { upShotShotGun = value; }
        }

        public virtual void LoadContent()
        {

        }

        public virtual List<Texture2D> GetBody(Gun.TYPE currentGun, MyCharacter.CURRENT_ACTIVITY currentActivity)
        {
            switch(currentActivity)
            {
                case MyCharacter.CURRENT_ACTIVITY.CROUCH:
                    return GetCrouchBody(currentGun);

                case MyCharacter.CURRENT_ACTIVITY.DIE:
                    return GetDieBody();
                    
                case MyCharacter.CURRENT_ACTIVITY.STAND:
                    return GetStandBody(currentGun);

                case MyCharacter.CURRENT_ACTIVITY.UP:
                    return GetUpBody(currentGun);

                case MyCharacter.CURRENT_ACTIVITY.SHOOT:
                    return GetShootBody(currentGun);
            }

            return null;
        }

        public List<Texture2D> GetFoot(MyCharacter.CURRENT_ACTIVITY currentActivity)
        {
            switch(currentActivity)
            {
                case MyCharacter.CURRENT_ACTIVITY.CROUCH:
                    return GetCrouchFoot();

                case MyCharacter.CURRENT_ACTIVITY.RUN:
                    return GetRunFoot();

                case MyCharacter.CURRENT_ACTIVITY.STAND:
                    return GetStandFoot();

            }
            return null;
        }

        public virtual List<Texture2D> GetCrouchBody(Gun.TYPE currentGun)
        {
            switch(currentGun)
            {
                case Gun.TYPE.MINIGUN:
                    return CrouchBodyMiniGun;

                case Gun.TYPE.SHOTGUN:
                    return CrouchBodyShotGun;
            }

            return null;
        }

        public virtual List<Texture2D> GetStandBody(Gun.TYPE currentGun)
        {
            switch (currentGun)
            {
                case Gun.TYPE.MINIGUN:
                    return BodyMiniGun;

                case Gun.TYPE.SHOTGUN:
                    return BodyShotGun;
            }

            return null;
        }

        public virtual List<Texture2D> GetShootBody(Gun.TYPE currentGun)
        {
            switch (currentGun)
            {
                case Gun.TYPE.MINIGUN:
                    return ShotBodyMiniGun;

                case Gun.TYPE.SHOTGUN:
                    return ShotBodyShotGun;
            }

            return null;
        }

        public virtual List<Texture2D> GetUpBody(Gun.TYPE currentGun)
        {
            switch (currentGun)
            {
                case Gun.TYPE.MINIGUN:
                    return UpBodyMiniGun;

                case Gun.TYPE.SHOTGUN:
                    return UpBodyShotGun;
            }

            return null;
        }

        public virtual List<Texture2D> GetDieBody()
        {
            return DieTexture2Ds;
        }

        public virtual List<Texture2D> GetCrouchFoot()
        {
            return CrouchFoot;
        }

        public virtual List<Texture2D> GetRunFoot()
        {
            return RunFoot;
        }

        public virtual List<Texture2D> GetStandFoot()
        {
            return StandFoot;
        }
    }
}
